maintenance: Remove arguments that match their default values
authorDerick Alangi <alangiderick@gmail.com>
Mon, 25 Feb 2019 17:11:57 +0000 (18:11 +0100)
committerD3r1ck01 <alangiderick@gmail.com>
Wed, 27 Feb 2019 21:13:57 +0000 (21:13 +0000)
Calls to methods with arguments as default values can safely be
removed as there is an exact match. With or without them, code
will still work as intended.

Change-Id: Id8141626a51d9cc8bf8bc0baeb5e38d120664da5

maintenance/resetUserEmail.php

index 771d19b..3ba5c6b 100644 (file)
@@ -32,10 +32,10 @@ require_once __DIR__ . '/Maintenance.php';
 class ResetUserEmail extends Maintenance {
        public function __construct() {
                $this->addDescription( "Resets a user's email" );
-               $this->addArg( 'user', 'Username or user ID, if starts with #', true );
+               $this->addArg( 'user', 'Username or user ID, if starts with #' );
                $this->addArg( 'email', 'Email to assign' );
 
-               $this->addOption( 'no-reset-password', 'Don\'t reset the user\'s password', false, false );
+               $this->addOption( 'no-reset-password', 'Don\'t reset the user\'s password' );
 
                parent::__construct();
        }